package fr.ralmn.OgameDroid.Object;

/**
 * 
 * @author ralmn
 * 
 */
public class Storage extends Batiment {

	private int base_met_c;
	private int base_cri_c;

	public Storage(String n, String d, int bmc, int bcc, int i) {
		super(n, d, i);
		base_met_c = bmc;
		base_cri_c = bcc;
	}

	/**
	 * @return Cout en metaux
	 */

	@Override
	public int getCoastMetal(int lvl) {
		return (int) (base_met_c * Math.pow(2, lvl));
	}

	/**
	 * @return Cout en cristaux
	 */
	@Override
	public int getCoastCristal(int lvl) {
		return (int) (base_cri_c * Math.pow(2, lvl));
	}

	/**
	 * @return Cout en deuterium
	 */

	@Override
	public int getCoastDeterium(int lvl) {
		return 0;
	}

	/**
	 * @return Capaciter de stockage
	 */

	public int getStorage(int lvl) {

		double t1 = lvl / 20.000;
		double t2 = 25 * Math.pow(183728, t1);
		double t3 = Math.ceil(t2 / 10);
		double t3b = t3 * 10;
		double t4 = t3b * 500;
		int i = (int) t4;
		return i;
	}
}
